From: umherirrender Date: Mon, 14 Jul 2014 12:21:54 +0000 (+0200) Subject: Add plural to message 'rcnotefrom' X-Git-Tag: 1.31.0-rc.0~14750^2 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=b8f77d2c77d23c36e09b578371475bdfe3410ae1;p=lhc%2Fweb%2Fwiklou.git Add plural to message 'rcnotefrom' Also use the splitted date and time on the message. Change-Id: I495d19258205d8713a19aa934a7657aecbe240d4 --- diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index 80c612f06a..3c8bdccf6d 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -53,7 +53,7 @@ abstract class ChangesListSpecialPage extends SpecialPage { $opts = $this->getOptions(); if ( $rows === false ) { if ( !$this->including() ) { - $this->doHeader( $opts ); + $this->doHeader( $opts, 0 ); $this->getOutput()->setStatusCode( 404 ); } @@ -327,7 +327,7 @@ abstract class ChangesListSpecialPage extends SpecialPage { public function webOutput( $rows, $opts ) { if ( !$this->including() ) { $this->outputFeedLinks(); - $this->doHeader( $opts ); + $this->doHeader( $opts, $rows->numRows() ); } $this->outputChangesList( $rows, $opts ); @@ -352,8 +352,9 @@ abstract class ChangesListSpecialPage extends SpecialPage { * Set the text to be displayed above the changes * * @param FormOptions $opts + * @param int $numRows Number of rows in the result to show after this header */ - public function doHeader( $opts ) { + public function doHeader( $opts, $numRows ) { $this->setTopText( $opts ); // @todo Lots of stuff should be done here. diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index c3d9d3eb3e..a2e271e5e5 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -356,8 +356,9 @@ class SpecialRecentChanges extends ChangesListSpecialPage { * Set the text to be displayed above the changes * * @param FormOptions $opts + * @param int $numRows Number of rows in the result to show after this header */ - public function doHeader( $opts ) { + public function doHeader( $opts, $numRows ) { global $wgScript; $this->setTopText( $opts ); @@ -367,7 +368,7 @@ class SpecialRecentChanges extends ChangesListSpecialPage { $panel = array(); $panel[] = self::makeLegend( $this->getContext() ); - $panel[] = $this->optionsPanel( $defaults, $nondefaults ); + $panel[] = $this->optionsPanel( $defaults, $nondefaults, $numRows ); $panel[] = '
'; $extraOpts = $this->getExtraOptions( $opts ); @@ -642,9 +643,10 @@ class SpecialRecentChanges extends ChangesListSpecialPage { * * @param array $defaults * @param array $nondefaults + * @param int $numRows Number of rows in the result to show after this header * @return string */ - function optionsPanel( $defaults, $nondefaults ) { + function optionsPanel( $defaults, $nondefaults, $numRows ) { global $wgRCLinkLimits, $wgRCLinkDays; $options = $nondefaults + $defaults; @@ -658,10 +660,15 @@ class SpecialRecentChanges extends ChangesListSpecialPage { $lang = $this->getLanguage(); $user = $this->getUser(); if ( $options['from'] ) { - $note .= $this->msg( 'rcnotefrom' )->numParams( $options['limit'] )->params( - $lang->userTimeAndDate( $options['from'], $user ), - $lang->userDate( $options['from'], $user ), - $lang->userTime( $options['from'], $user ) )->parse() . '
'; + $note .= $this->msg( 'rcnotefrom' ) + ->numParams( $options['limit'] ) + ->params( + $lang->userTimeAndDate( $options['from'], $user ), + $lang->userDate( $options['from'], $user ), + $lang->userTime( $options['from'], $user ) + ) + ->numParams( $numRows ) + ->parse() . '
'; } # Sort data for display and make sure it's unique after we've added user data. diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 94de5ce376..372886c4be 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -391,8 +391,9 @@ class SpecialWatchlist extends ChangesListSpecialPage { * Set the text to be displayed above the changes * * @param FormOptions $opts + * @param int $numRows Number of rows in the result to show after this header */ - public function doHeader( $opts ) { + public function doHeader( $opts, $numRows ) { $user = $this->getUser(); $this->getOutput()->addSubtitle( diff --git a/languages/i18n/en.json b/languages/i18n/en.json index e42d716df6..c730de85e0 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1192,7 +1192,7 @@ "recentchanges-legend-bot": "{{int:recentchanges-label-bot}}", "recentchanges-legend-unpatrolled": "{{int:recentchanges-label-unpatrolled}}", "recentchanges-legend-plusminus": "(±123)", - "rcnotefrom": "Below are the changes since $2 (up to $1 shown).", + "rcnotefrom": "Below {{PLURAL:$5|is the change|are the changes}} since $3, $4 (up to $1 shown).", "rclistfrom": "Show new changes starting from $2, $3", "rcshowhideminor": "$1 minor edits", "rcshowhideminor-show": "Show", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index ad5b28880b..d54d7212a3 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1354,7 +1354,7 @@ "recentchanges-legend-bot": "Used as legend on [[Special:RecentChanges]] and [[Special:Watchlist]].\n\nRefers to {{msg-mw|Recentchanges-label-bot}}.", "recentchanges-legend-unpatrolled": "Used as legend on [[Special:RecentChanges]] and [[Special:Watchlist]].\n\nRefers to {{msg-mw|Recentchanges-label-unpatrolled}}.", "recentchanges-legend-plusminus": "{{optional}}\nA plus/minus sign with a number for the legend.", - "rcnotefrom": "This message is displayed at [[Special:RecentChanges]] when viewing recentchanges from some specific time.\n\nThe corresponding message is {{msg-mw|Rclistfrom}} (split into date and time).\n\nParameters:\n* $1 - the maximum number of changes that are displayed\n* $2 - a date and time\n* $3 - (Optional) a date\n* $4 - (Optional) a time", + "rcnotefrom": "This message is displayed at [[Special:RecentChanges]] when viewing recentchanges from some specific time.\n\nThe corresponding message is {{msg-mw|Rclistfrom}}.\n\nParameters:\n* $1 - the maximum number of changes that are displayed\n* $2 - a date and time (Optional)\n* $3 - a date\n* $4 - a time\n* $5 - Number of changes are displayed, for use with PLURAL", "rclistfrom": "Used on [[Special:RecentChanges]]. Parameters:\n* $1 - (Currently not use) date and time. The date and the time adds to the rclistfrom description.\n* $2 - time. The time adds to the rclistfrom link description (with split of date and time).\n* $3 - date. The date adds to the rclistfrom link description (with split of date and time).\n\nThe corresponding message is {{msg-mw|Rcnotefrom}}.", "rcshowhideminor": "Option text in [[Special:RecentChanges]]. Parameters:\n* $1 - the \"show/hide\" command, with the text taken from either {{msg-mw|rcshowhideminor-show}} or {{msg-mw|rcshowhideminor-hide}}\n{{Identical|Minor edit}}", "rcshowhideminor-show": "{{doc-actionlink}}\nOption text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideminor}}.\n\nSee also:\n* {{msg-mw|rcshowhideminor-hide}}\n{{Identical|Show}}",